home *** CD-ROM | disk | FTP | other *** search
/ MIDICraft's MIDINET CD-ROM / MIDICraft's MIDINET CD-ROM.iso / DOCS / MIDIINFO.DOC < prev    next >
Encoding:
Text File  |  1997-01-03  |  17.9 KB  |  335 lines

  1.  
  2.  
  3. Introduction into MIDI
  4.  
  5.  
  6. HOW MUCH FOR JUST THE MIDI?
  7.  
  8. By Eric Lipscomb (BITNET:  LIPS@UNTVAX).  This  article appeared in the
  9. October 1989 issue of North Texas Computing Center Newsletter,
  10. "Benchmarks".
  11.  
  12. Computer retailers are hearing about it.   Music store sales people are
  13. buying and selling it.  Musicians  and  students  are talking about it.
  14. Professional  writers  are  publishing   articles   about  it.   Entire
  15. magazines are devoted to it.   Students  at the Massachusetts Institute
  16. of Technology are receiving large  grants  to  research it.  Joe "Keys"
  17. Manzotti uses it when he  plays  with  his  band  at the Holiday Inn on
  18. weekends.  Just what IS this MIDI thing anyway?
  19.  
  20. MIDI stands for Musical Instrument  Digital  Interface and has been the
  21. rage among electronic musicians throughout  its six year existence.  It
  22. is a  powerful  tool  for  composers  and  teachers  alike.  It  allows
  23. musicians to be more creative  on  stage  and  in the studio. It allows
  24. composers to write music that no  human  could ever perform.  But it is
  25. NOT a tangible object, a  thing  to  be  had.  MIDI is a communications
  26. protocol that allows electronic  musical  instruments  to interact with
  27. each other.
  28.  
  29.  
  30. A Method, Not An Object
  31.  
  32. All too often I  have  seen  misinformed  customers  browsing through a
  33. music store: "Where do you keep your  MIDIs?"   "I'd like to get a MIDI
  34. for my home computer."  "I need to  get  two  MIDIs so they can talk to
  35. each other, right?"  Explaining to customers  that they cannot just get
  36. a MIDI becomes frustrating  to  the  salesman. Fortunately, the average
  37. consumer is learning more about  the  concept  of MIDI through articles
  38. such as this one.  To have a  complete understanding of how MIDI works,
  39. though, one should learn its history.
  40.  
  41. The Saga of MIDI
  42.  
  43. The combined advances  and  cost-efficiency  in  synthesizer technology
  44. caught the music world by storm.  At  times, a musician could not get a
  45. new synthesizer home before it had been outdated by a new product.  One
  46. major factor in  the  increased  popularity  in  synthesizers,  and the
  47. increased push  for  research  and  design  of  these  units,  was  the
  48. development of new sound  generation  methods.  Musicians were creating
  49. new and different sounds worldwide. Eventually, the musical world began
  50. to recognize the synthesizer as a legitimate musical instrument.
  51.  
  52. Musicians were physically limited,  though,  because  they had only two
  53. hands.  Popular and  avant-garde  performers  alike  desired to "layer"
  54. their new sound creations,  to  play  two  sounds  together to create a
  55. "larger" sound.  Though this was  possible  to  some extent in a multi-
  56. track recording studio, layering could not  be realized on the road.  A
  57. few synthesizer design  technicians  from  different manufacturers then
  58. got together to discuss an idea  they shared.  Surely, they said, there
  59. had to be a  way  to  play  one  keyboard  and  have  another one sound
  60. simultaneously.  They jotted a few notes, considered a few options, and
  61. scuttled back to their design labs to create this communication method.
  62.  
  63. They  revealed  their  results  at   the  first  North  American  Music
  64. Manufacturers show in Los  Angeles  in  1983.  The simple demonstration
  65. connected two synthesizers, not manufactured  by the same company, with
  66. two cables.  A representative from one  company  then played one of the
  67. synthesizers while an amazed  audience  heard  both sound.  The process
  68. was  then  reversed  to   demonstrate   the   two-way   nature  of  the
  69. communication.  Other variations  were  illustrated,  and  the  rest is
  70. music history.
  71.  
  72. The Method of MIDI
  73.  
  74. Much in the same way  that  two  computers  communicate via modems, two
  75. synthesizers communicate via MIDI.   The  information exchanged between
  76. two MIDI devices  is  musical  in  nature.   MIDI  information  tells a
  77. synthesizer, in its most basic mode,  when  to start and stop playing a
  78. specific note.   Other  information  shared  includes  the  volume  and
  79. modulation of the note,  if  any.   MIDI  information  can also be more
  80. hardware specific.  It can tell a  synthesizer to change sounds, master
  81. volume, modulation devices, and  even  how  to receive information.  In
  82. more advanced uses, MIDI information  can  to indicate the starting and
  83. stopping points of a song or  the  metric position within a song.  More
  84. recent applications include using the interface between computers and
  85. synthesizers to edit and store sound information for the synthesizer on
  86. the computer.
  87.  
  88. The basis for MIDI communication is the byte.  Through a combination of
  89. bytes a vast  amount  of  information  can  be  transferred.  Each MIDI
  90. command has a specific byte  sequence.   The  first  byte is the status
  91. byte, which tells the MIDI device what function to perform.  Encoded in
  92. the status byte is the  MIDI  channel.   MIDI  operates on 16 different
  93. channels, numbered 0 through 15.   MIDI  units  will accept or ignore a
  94. status byte depending on what  channel  the  machine is set to receive.
  95. Only the status byte has  the  MIDI  channel number encoded.  All other
  96. bytes are assumed to be  on  the  channel  indicated by the status byte
  97. until another status byte is received.
  98.  
  99. Some of these functions indicated in the  status byte are Note On, Note
  100. Off, System Exclusive (SysEx), Patch  Change,  and  so on. Depending on
  101. the status byte, a number of  different byte patterns will follow.  The
  102. Note On status byte tells  the  MIDI  device  to begin sounding a note.
  103. Two additional bytes are required, a  pitch  byte, which tells the MIDI
  104. device which note to play, and a  velocity byte, which tells the device
  105. how loud to play the note.  Even  though not all MIDI devices recognize
  106. the velocity byte,  it  is  still  required  to  complete  the  Note On
  107. transmission.
  108.  
  109. The command to stop playing a note is  not part of the Note On command;
  110. instead there is  a  separate  Note  Off  command.   This  command also
  111. requires two additional bytes with  the  same  functions as the Note On
  112. byte.  Most people are confused at  first  by  this approach to Note On
  113. and Note Off, but after further  thought  they realize the necessity of
  114. the structure.
  115.  
  116. Another important status byte is the  Patch Change byte.  This requires
  117. only one additional  byte:  the  number  corresponding  to  the program
  118. number on the synthesizer.  The  patch  number information is different
  119. for  each  synthesizer,  and  the  standards   have  been  set  by  the
  120. International MIDI Association (IMA).   Channel  selection is extremely
  121. helpful when sending Patch Change commands to a synthesizer.
  122.  
  123. The SysEx status byte is the most  powerful and least understood of all
  124. the status bytes  because  it  can  instigate  a  variety of functions.
  125. Briefly, the SysEx byte requires at  least three additional bytes.  The
  126. first is a manufacturer's ID  number  or  timing  byte, the second is a
  127. data format or function byte,  and  the  third  is generally an "end of
  128. transmission" (EOX) byte.  There are a  number  of books that have been
  129. written on the topic of System Exclusive messages, so this article will
  130. not deal with it further.
  131.  
  132. The INs and OUTs of MIDI
  133.  
  134. The closest most people ever  care  to  get  to  the  heart of the MIDI
  135. interface are the three 5-pin  ports  found  on  the back of every MIDI
  136. unit.  Labeled IN,  OUT,  and  THRU,  these  ports  control  all of the
  137. information routing in a MIDI  system.  The  IN port accepts MIDI data,
  138. data coming "in" to the unit from an external source.  This is the data
  139. that controls the sound  generators  of  the  synthesizer. The OUT port
  140. sends MIDI data "out" to the rest  of the MIDI setup. This data results
  141. from activity of the synthesizer,  such  as key presses, patch changes,
  142. and so on.  The THRU port also  sends  data out to the MIDI system, but
  143. not in the same manner as the  OUT  port. The data coming from the THRU
  144. port is an exact copy  of  the  data  received  at the synthesizer's IN
  145. port.  There is no change made to the  data from the time it arrives at
  146. the IN port to the time is leaves  the THRU port (which is a very, VERY
  147. small amount of time).
  148.  
  149. MIDI  makes  use  of  special  five  conductor  cable  to  connect  the
  150. synthesizer ports.  Curiously though, only  three of the conductors are
  151. actually used.  Data is carried through the  cable on pins 1 and 3, and
  152. pin 2 is shielded and connected to common.  Pins 4 and 5 remain unused.
  153. Not just any cable will suffice  for  the exactness of the MIDI system,
  154. either.  MIDI  cable  is  specially  grounded  and  shielded  to ensure
  155. efficient data transmission.  This means  that  MIDI  cable is a little
  156. more expensive  than  standard  5-conductor  cable,  but  reliable data
  157. transmission is absolutely necessary for MIDI.
  158.  
  159. The length of  the  cable  is  critical  as  well.   IMA specifications
  160. suggest an absolute maximum  cable  length  of  50  feet because of the
  161. method of data transmission through the  cable.  The entire length of a
  162. MIDI chain (discussed below) is  unlimited, however, provided that none
  163. of the links are longer than  50  feet.  The optimal maximum length for
  164. cable is about 20 feet, and  most commercially manufactured cable comes
  165. in five to ten foot lengths.
  166.  
  167. MIDI Chains and Loops
  168.  
  169. A MIDI chain describes a series of one-way connections in a MIDI setup.
  170. The elemental chain is a single-link  chain.   The MIDI OUT port of one
  171. device is  connected  to  the  MIDI  IN  port  of  a  second.   In this
  172. configuration, a key pressed on the first unit will cause both units to
  173. sound.  Pressing a key on  the  second  unit,  however, only causes the
  174. second unit to sound.  Many instruments may be chained together using a
  175. series of single links to connect the  units.  In this case, the OUT of
  176. the first unit is connected to  the  second,  the THRU of the second is
  177. connected to the IN of a third, and so on.  If all the units are set to
  178. receive on the same channel, pressing a key on the first one will cause
  179. all the units to sound.  Pressing a key  on any of the other units will
  180. only activate the sound of that unit.
  181.  
  182. A MIDI loop is a  special  configuration  of  a MIDI chain.  The single
  183. element loop is  made  of  two  interconnecting  links.   This  was the
  184. configuration used in the debut of  the  MIDI  system.  The OUT port of
  185. the first unit is connected to the  IN  port of the second, and the OUT
  186. port of the second is connected to  the  IN port of the first.  In this
  187. case, as described earlier, a  key  pressed  on either unit causes both
  188. units to sound, provided they are on the same channel.  A MIDI feedback
  189. loop does NOT exist here, as the  data  going into the second unit from
  190. the first is not duplicated in  the  OUT  port of the second going back
  191. into the first.  Here,  we  have  two  one-way  links  connected, not a
  192. multi-link chain.
  193.  
  194. MIDI loops connecting several devices using  all three ports can become
  195. complex very quickly.  As  a  brief  example, imagine four synthesizers
  196. named A, B, C, and D for  convenience.   A's OUT is connected to B's IN
  197. and consequently to C's IN via B's  THRU.   B's OUT connects to D's IN,
  198. whose THRU connects to A's IN.  A key  pressed  on A sounds A, B and C.
  199. A key pressed on C sounds C and C  alone.  A key pressed on B sounds B,
  200. D, and A, while a key pressed  on  D  sounds  D only.  C does not sound
  201. when B is pressed because there  is  no direct connection between B and
  202. C, and B's note, which does route  through  D, does not route through A
  203. into C because A's THRU is  not  connected  to  C, or anything else for
  204. that matter.  A note played on A does not sound on D for the same
  205. reason.  You get the idea.
  206.  
  207.  
  208. Computers and MIDI
  209.  
  210. Computer manufacturers soon  realized  that  the  computer  would  be a
  211. fantastic tool for MIDI,  since  MIDI  devices  and computers speak the
  212. same language.  Since the MIDI  data  transmission rate (31.5 kBaud) is
  213. different from ANY computer data  rate,  manufacturers  had to design a
  214. MIDI interface to allow the  computer  to  talk at MIDI's speed.  Apple
  215. Computers, with the Macintosh and  Apple  ][ series, and Commodore were
  216. the first  companies  to  jump  on  the  MIDI  computer  bandwagon [pun
  217. intended].   Roland  designed  an  interface  for  the  IBM  series  of
  218. compatible computers a few years later, and Atari designed a completely
  219. new computer, the ST series, with  fully  operable MIDI ports built in.
  220. Today, there are many  different  interfaces  available  for almost all
  221. types of computer system.
  222.  
  223. As great as the number of available interfaces may be, the availability
  224. of software packages is almost beyond belief. Virtually everything that
  225. can be done via MIDI has a  software  package to do it.  First came the
  226. sequencers.  Based  on  a  hardware  device  that  simply  recorded and
  227. replayed MIDI data,  the  software  sequencer  allowed  the computer to
  228. record, store, replay, and  edit  MIDI  data  into "songs."  Though the
  229. first sequencers were somewhat primitive,  the packages available today
  230. provide  very  thorough  editing  capabilities  as  well  as  intricate
  231. synchronization methods, such as MTC (MIDI Time Code) and SMPTE.
  232.  
  233. Various patch editors and librarians  are also available for computers.
  234. These programs allow the user to  edit sounds away from the synthesizer
  235. and often in a much  friendlier  environment  than what the synthesizer
  236. interface offers.  The more advanced  librarians permit groups or banks
  237. of sounds to be edited, stored  on  disk,  or moved back and forth from
  238. the synthesizer's memory. They also allow for rearranging sounds within
  239. banks or groups of banks for  customized libraries.  These programs are
  240. generally small and can be  incorporated  into some sequencing packages
  241. for ease of  use.   On  the  other  hand,  each  synthesizer requires a
  242. different editor/librarian since internal  data  formats are unique for
  243. each.
  244.  
  245. Some packages offer editor groups for a specific manufacturer's line as
  246. some of the internal data structure  may  be similar between the units.
  247. But, there is not yet a  universal  librarian that covers all makes and
  248. models of sound modules; it would just be too large.
  249.  
  250.  
  251. Computers in MIDI Chains
  252.  
  253. Basically, the computer functions the same as  any other unit in a MIDI
  254. chain or loop.  Most interfaces have the same three ports as other MIDI
  255. devices.  The computer's main job  in  a  chain,  though, would be as a
  256. MIDI data driver, meaning it would supply the MIDI data for the rest of
  257. the chain.  Very rarely is  a  device  connected  to  the  IN port of a
  258. computer MIDI interface  except  to  provide  input for synchronization
  259. signals or data  to  edit.   Even  more  rare  is  a  connection to the
  260. computer's THRU port, although it can be used.
  261.  
  262. In this scope the implementation  of  MIDI  channels is most effective.
  263. The computer can send data out  on all 16 MIDI channels simultaneously.
  264. For example, sixteen MIDI devices,  each  set  up  for a different MIDI
  265. channel, could be  connected  to  the  computer.   Each  unit  could be
  266. playing a separate line  in  a  song  from  the  sequencer, creating an
  267. electronic orchestra.  This implementation is  being used more and more
  268. in today's music scenes: the recording studio, major orchestras, opera,
  269. and film scoring.
  270.  
  271. The Future of MIDI
  272.  
  273. The MIDI specifications set out  by  the  initial  design team have not
  274. changed drastically since its creation.   The current data structure is
  275. as it was originally designed,  the  only  exception being that some of
  276. the initial status bytes were not initially defined.  As it stands, the
  277. architecture of MIDI does  not  allow  for  any  further expansion.  To
  278. enhance MIDI further would take a complete redesign of the system.  The
  279. IMA has been discussing new MIDI  designs, but industry and the general
  280. public will prevent any real action  from  taking place because the new
  281. design would not be  backwards  compatible:  none  of  the current MIDI
  282. hardware would operate in the new environment.
  283.  
  284. But MIDI does  continue  to  hold  promise.   The  extent  of the SysEx
  285. applications has not yet  been  fully  realized.   MIDI  is by no means
  286. about to become outdated  or  abandoned  by  the  musical world, and as
  287. technology becomes more and more  affordable,  a greater number of non-
  288. technical people will invest in their own personal MIDI systems.  There
  289. may in fact be a day where the  average American family has a home, two
  290. cars, three kids, and their own MIDI in the garage.
  291.  
  292.  
  293. References
  294.  
  295. Arnell, Billy.  "McScope: System."  Music, Computers, and Software,
  296. April 1988: 58-60.
  297.  
  298. Conger, Jim.  C Programming for MIDI.  Redwood City: M & T Books, 1988.
  299.  
  300. Cooper, Jim.  "Mind Over MIDI: Information Sources and
  301. System-exclusive Data Formats."  Keyboard October, 1986: 110-111.
  302.  
  303. Enders, Bernd and Wolfgang Klemme.  MIDI and Sound Book for the
  304. Atari ST.  Redwood City: M & T Books, 1989.
  305.  
  306. Matzkin, Jonathan.  "A MIDI Musical Offering."  PC Magazine 29 Nov.
  307. 1988: 229+.
  308.  
  309. Peters, Constantine.  "Reading up on MIDI for the Novice and the
  310. Pro."  PC Magazine 29 Nov. 1988: 258.
  311.  
  312.  
  313.  
  314. ABOUT  THE  AUTHOR:  Eric  Lipscomb   is   a   Vice  President  of  the
  315. International  Electronic  Musicians  User's   Group,  an  organization
  316. devoted to the advancement of knowledge about MIDI and other aspects of
  317. electronic music In his spare time he  writes for and performs with the
  318. comedy group "Green Chili Burp and the Aftertaste."
  319.  
  320.  
  321. CCNEWS Copyright Notice
  322.  
  323. If you use this article, in whole  or in part, in printed or electronic
  324. form, you are legally and  morally  obligated  to credit the author and
  325. the original publication name, date,  and  page(s). We suggest that you
  326. also inform the author of your  intention  to use this article, in case
  327. there are updates or corrections that he or she might wish to suggest.
  328.  
  329. If space and format  permit,  we  would  appreciate  your crediting the
  330. "Articles database of CCNEWS, the Electronic Forum for Campus Computing
  331. Newsletter Editors, a BITNET-based  service  of  EDUCOM." We would also
  332. appreciate your informing us (via e-mail to CCNEWS@EDUCOM) when you use
  333. an article, so we will know which articles have proven most useful.
  334.  
  335.